<ion-view view-title="我的优惠券" hide-back-button="true">
  <ion-nav-bar class="bar-positive nav-bar-container">
      <ion-nav-buttons side="left">
          <button class="button button-clear" ui-sref="web.user-index" nav-direction="back">
              <i class="icon ion-chevron-left" ></i> 返回
          </button>
      </ion-nav-buttons>
  </ion-nav-bar>
  <ion-content class="content has-header ionic-pseudo bgeee">
        <div class="padding">
<div class="button-bar" ng-show="!beenused">
  <a class="button button-positive" ng-click="unuse()">未使用</a>
  <a class="button button-outline" ng-click="used()">已使用</a>
</div>
<div class="button-bar" ng-show="beenused">
  <a class="button button-outline" ng-click="unuse()">未使用</a>
  <a class="button button-positive" ng-click="used()">已使用</a>
</div>
        </div>
        <div>
          <div class="item-voucherout" ng-repeat="discount in discounts" ng-show="!beenused">
          <div class="item-voucher">
            <div class="voucherin">
              <div class="left-box">
                <div class="padding left-boxin">
                    <h1 class="tc size-16">{{discount.name}}</h1>
                截止时间：{{discount.endTime | date: 'yyyy-MM-dd'}}<br>
                使用说明：
                <a ng-if="discount.type==1">投资金</a>
                <a ng-if="discount.type==2">加息券</a>
                <a ng-if="discount.type==3">代金券</a>
                -{{discount.useDesc}}<br>
                </div>
              </div>
              <div class="right-box">
                <div class="padding tc right-boxin">
                <h1 class="tc size-16">
                  <a ng-if="discount.state==0">未使用</a>
                  <a ng-if="discount.state==1">已使用</a>
                </h1>
                <b class="assertive size-21" ng-if="discount.type!=2">{{discount.amount}}元</b>
                <b class="assertive size-21" ng-if="discount.type==2">{{discount.interestPercent}}%</b><br>
                <br>
                </div>
              </div>
            </div>
            <div class="left-ball"></div>
            <div class="right-ball"></div>
          </div>
          </div>
          <div class="item-voucherout" ng-repeat="discount in discounts1" ng-show="beenused">
          <div class="item-voucher">
            <div class="voucherin">
              <div class="left-box">
                <div class="padding left-boxin">
                    <h1 class="tc size-16">{{discount.name}}</h1>
                截止时间：{{discount.endTime | date: 'yyyy-MM-dd'}}<br>
                使用说明：{{discount.useDesc}}<br>
                </div>
              </div>
              <div class="right-box">
                <div class="padding tc right-boxin">
                <h1 class="tc size-16">
                  <a ng-if="discount.state==0">未使用</a>
                  <a ng-if="discount.state==1">已使用</a>
                </h1>
                <b class="assertive size-21">{{discount.amount}}元</b><br>
                <br>
                </div>
              </div>
            </div>
            <div class="left-ball"></div>
            <div class="right-ball"></div>
          </div>
          </div>
          <!-- 
          <div class="item-voucher">
            <div class="voucherin">
              <div class="left-box">
                <div class="padding left-boxin">
                    <h1 class="tc size-16">20元代金券{{}}</h1>
                截止时间：{{tzfx.endTime | date: 'yyyy-MM-dd'}}<br>
                说明：购买赠20元代金券{{tzfx.startTime | date: 'yyyy-MM-dd'}}<br><br>
                </div>
              </div>
              <div class="right-box">
                <div class="padding tc right-boxin">
                <h1 class="tc size-16">未使用<a ng-if="tzfx.status==0">未使用</a><a ng-if="tzfx.status==1">已使用</a></h1>
                <b class="assertive size-21">10元</b><br>
                满1000元使用<br>
                </div>
              </div>
            </div>
            <div class="left-ball"></div>
            <div class="right-ball"></div>
          </div>
          <div class="item-voucher">
            <div class="voucherin">
              <div class="left-box">
                <div class="padding left-boxin">
                    <h1 class="tc size-16">面膜兑换券{{}}</h1>
                截止时间：{{tzfx.endTime | date: 'yyyy-MM-dd'}}<br>
                说明：推广送面膜{{tzfx.startTime | date: 'yyyy-MM-dd'}}<br><br>
                </div>
              </div>
              <div class="right-box">
                <div class="padding tc right-boxin">
                <h1 class="tc size-16">未使用<a ng-if="tzfx.status==0">未使用</a><a ng-if="tzfx.status==1">已使用</a></h1>
                <b class="assertive size-21">面膜x张</b><br>
                </div>
              </div>
            </div>
            <div class="left-ball"></div>
            <div class="right-ball"></div>
          </div>  -->
        </div>
        <br>
        <div>
        获取优惠券方式：   
  <ion-item class="item-icon-right" ui-sref="web.activity-index" nav-direction="forward">
    <h2>活动</h2>
    <i class="icon ion-chevron-right icon-accessory"></i>
  </ion-item>
  <ion-item class="item-icon-right" ui-sref="user-invite">
    <h2>去邀请好友</h2>
    <i class="icon ion-chevron-right icon-accessory"></i>
  </ion-item>          
        </div>

  </ion-content>
</ion-view>